﻿<UserControl x:Class="MyHome.Configuration.Views.ConfigurationPaneView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <StackPanel Margin="5">
            <TextBlock Text="Configuration" FontSize="20" Margin="0,10,0,10"/>
            <TextBlock Text="{Binding Namespace, Mode=OneWay}" />
            <TextBlock Text="{Binding ClassName, Mode=OneWay}" />
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="ID: " />
                <TextBlock Text="{Binding Id, Mode=OneWay}" />
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="Type: " />
                <TextBlock Text="{Binding PluginType, Mode=OneWay}" />
            </StackPanel>
        </StackPanel>
            <!--<ItemsControl ItemsSource="{Binding Configuration}">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="135" />
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>
                            <TextBlock Text="{Binding Key}" />
                            <TextBox Text="{Binding Value}" Grid.Column="1" />
                        </Grid>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>-->
            <DataGrid Grid.Row="1" ItemsSource="{Binding Configuration}"/>
        <Button Grid.Row="2" Content="Add" Margin="5" Command="{Binding AddConfigurationEntryCommand}"/>
    </Grid>
</UserControl>